package cn.mesmile.shiro.module.user.controller;


import cn.mesmile.shiro.module.user.dto.UserVo;
import cn.mesmile.shiro.module.user.service.UserService;
import org.springframework.web.bind.annotation.*;
import lombok.AllArgsConstructor;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zb
 * @date 2021/02/04 15:09
 */
@AllArgsConstructor
@RestController
@RequestMapping("/api/v1/user")
public class UserController {

    private final UserService userService;


    /**
     *  查找用户所有信息，包括 角色和权限
     * @param username
     * @return
     */
    @GetMapping("/findAllUserInfo")
    public UserVo findAllUserInfo(@RequestParam("username") String username){
        return userService.findAllUserInfoByUsername(username);
    }

}

